package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

/**
 * Created by Sasha on 14.07.2014.
 */
public class ComparisonPage extends HomePage {

    private static final By keyLocator = By.xpath("//td[@class='detail-title']");
    private static final String valueLocator = "//td[@class='detail-title']/ancestor::tr/td[%d]";

    public ComparisonPage(WebDriver driver){
        super(driver);
    }

    public List<WebElement> getKeyValue()
    {
        return driver.findElements(keyLocator);
    }

    public List<WebElement> getProdValue(int i)
    {
        return driver.findElements(By.xpath(String.format(valueLocator,i)));
    }
}
